import { defHttp } from '/@/utils/http';

export function getAllJobApi() {
  const params = {
    page: 0,
    size: 9999,
    enabled: true,
  };
  return defHttp.get<any>({ url: '/api/job', params });
}

export function getJobsApi(params: any) {
  return defHttp.get<any>({ url: '/api/job', params }, { joinParamsToGetUrl: true });
}

export function addJobApi(params: any) {
  return defHttp.post<any>({ url: '/api/job', params });
}

export function editJobApi(params: any) {
  return defHttp.put<any>({ url: '/api/job', params });
}

export function delJobApi(ids: number[]) {
  return defHttp.delete<any>({ url: '/api/job', params: ids });
}
